<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>datetimePiker demo</title>

  <!-- Bootstrap -->
  <link href="/static/bootstrap-3.3.4/dist/css/bootstrap.min.css" rel="stylesheet">

  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
  <div class="main-title">
    <h2>datetimePiker demo</h2>
  </div>
  <div class="container">

    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">
          <h4>需要引入</h4>
        </h3>
      </div>
      <div class="panel-body">
        <p>jquery.js</p>
        <p>datetimepicker.css</p>
        <p>dropdown.css</p>
        <p>bootstrap-datetimepicker.min.js</p>
        <p>bootstrap-datetimepicker.zh-CN.js</p>
      </div>
    </div>

    <form action="{:url('test')}" enctype="application/x-www-form-urlencoded" method="POST"
            class="form-horizontal">
      <div class="form-group">
        <label class="col-sm-12">日期时间</label>
        <div class="col-lg-6">
          <input type="text" class="text timestr" name="begin_time" value=""></div>
      </div>

      <div class="form-group">
        <label class="col-sm-12">日期</label>
        <div class="col-lg-6">
          <input type="text" class="text date" name="" value=""></div>
      </div>

      <div class="form-group">
        <label class="col-sm-12">时间</label>
        <div class="col-lg-6">
          <input type="text" class="text time" name="" value=""></div>
      </div>

      <div class="form-group">
        <label class="col-sm-12">时间2</label>
        <div class="col-lg-6">
          <input type="text" class="text time2" name="" value=""></div>
      </div>

    </form>
  </div>
  <!-- jQuery -->
  <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>

  <link href="/static/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
  <link href="/static/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
  <script type="text/javascript" src="/static/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
  <script type="text/javascript" src="/static/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

  <script type="text/javascript">
        
        $(function(){
           $('.timestr').datetimepicker({
               format: 'yyyy-mm-d hh:ii:ss',
               language:"zh-CN",
               minView:0,
               //startView:1,
               autoclose:true
           });


           $('.date').datetimepicker({
               format: 'yyyy-mm-d',
               language:"zh-CN",
               minView:2,
               //startView:1,
               autoclose:true
           });



           $('.time').datetimepicker({
               format: 'hh:ii:ss',
               language:"zh-CN",
               minView:0,
               startView:1,
               autoclose:true
           });

           $('.time2').datetimepicker({
               format: 'hh:ii',
               language:"zh-CN",
               minView:0,
               startView:1,
               autoclose:true
           });
        })

    </script>

</body>
</html>